'''
Created on 2012-4-2

@author: nagat
@email:  yasenagat@gmail.com


'''
from bottle import route, request, run

@route('/login',method='post')
def login():
    
    username = request.forms.get('username', '')
    password = request.forms.get('password', '')
    
    print(request.get("username"))   
    print(request.get("password")) 
    
    print(request.get_header("username"))
    print(request.get_header("password"))
    
    print(request.query)
    
#    print(username)
#    print(password)
    
    if username == 'admin' and password == 'admin' :
        return 'True'
    else:
        return 'False'
    
    
run()